<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>东家帮-用户登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="alternate icon" type="image/png"
	href="${base}/amazeui/assets/i/favicon.png">
<link rel="stylesheet" href="${base}/css/common.css" />
<link rel="stylesheet" href="${base}/amazeui/assets/css/amazeui.min.css" />
<link rel="stylesheet" href="${base}/css/index.css" />
<base href="${base}/index/">
 <style type="text/css">
  body { background: white;}
  </style>
</head>
<body>
	<div class="login-banner">
		<div class="login-main">
			<div class="login-banner-bg">
			</div>
			<div class="login-box">
				<h3 class="title">登录东家帮</h3>
				<div class="clear"></div>
				<div class="login-form">
					<form method="post" name="loginform"  id="loginform" class="am-form" action="${base}/index/login">
						<div class="user-name">
							<label for="phone"><i class="am-icon-user"></i></label> <input
								type="text" name="phone" id="phone" placeholder="手机" value="" style="padding-left: 40px;">
						</div>
						<div class="user-pass">
							<label for="password"><i class="am-icon-lock"></i></label> <input
								type="password" name="password" id="password" placeholder="请输入密码" value="" style="padding-left: 40px;">
						</div>
					</form>
				</div>

				<div class="login-links">
					<label for="remember-me"><input id="remember-me"
						type="checkbox">记住密码</label> <a href="#" class="am-fr">忘记密码</a> <a
						href="register" class="zcnext am-fr am-btn-default">注册</a> <br>
				</div>
				<div class="am-cf">
					<input type="button"  value="登 录" onclick="login()" class="am-btn am-btn-primary am-btn-sm">
				</div>
				<div class="login-links" >
					${msg}
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="${base}/js/common.js"></script>
<script src="${base}/js/jquery1.10.2.min.js"></script>
<script src="${base}/js/jquery.form.js"></script>
<script>
	function login() {
		var options = {
			success : showResponse2, //处理完成的回调函数
			resetForm : true
		};
		$("#loginform").ajaxSubmit(options);
	}
	function showResponse2(responseText) {
		alert(responseText);
		if (responseText.indexOf("操作成功") > -1){
			window.location.href = "${base}/index/main";	
		}
		
	}
</script>
</html>
